package com.whnk.pm.service.impl;

import java.util.List;

import com.whnk.pm.domain.CompanyProcurement;
import com.whnk.pm.mapper.CompanyProcurementMapper;
import com.whnk.pm.service.ICompanyProcurementService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.whnk.common.support.Convert;

/**
 * 公司采购 服务层实现
 * 
 * @author whwhnk
 * @date 2020-02-04
 */
@Service
public class CompanyProcurementServiceImpl implements ICompanyProcurementService
{
	@Autowired
	private CompanyProcurementMapper companyProcurementMapper;

	/**
     * 查询公司采购信息
     * 
     * @param id 公司采购ID
     * @return 公司采购信息
     */
    @Override
	public CompanyProcurement selectCompanyProcurementById(Integer id)
	{
	    return companyProcurementMapper.selectCompanyProcurementById(id);
	}
	
	/**
     * 查询公司采购列表
     * 
     * @param companyProcurement 公司采购信息
     * @return 公司采购集合
     */
	@Override
	public List<CompanyProcurement> selectCompanyProcurementList(CompanyProcurement companyProcurement)
	{
	    return companyProcurementMapper.selectCompanyProcurementList(companyProcurement);
	}
	
    /**
     * 新增公司采购
     * 
     * @param companyProcurement 公司采购信息
     * @return 结果
     */
	@Override
	public int insertCompanyProcurement(CompanyProcurement companyProcurement)
	{
	    return companyProcurementMapper.insertCompanyProcurement(companyProcurement);
	}
	
	/**
     * 修改公司采购
     * 
     * @param companyProcurement 公司采购信息
     * @return 结果
     */
	@Override
	public int updateCompanyProcurement(CompanyProcurement companyProcurement)
	{
	    return companyProcurementMapper.updateCompanyProcurement(companyProcurement);
	}

	/**
     * 删除公司采购对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	@Override
	public int deleteCompanyProcurementByIds(String ids)
	{
		return companyProcurementMapper.deleteCompanyProcurementByIds(Convert.toStrArray(ids));
	}
	
}
